<template>
  <div>
    <router-view />
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="search" to="/find">发现</van-tabbar-item>
      <van-tabbar-item icon="friends-o" to="/dynamic">动态</van-tabbar-item>
      <van-tabbar-item icon="comment-o" to="/message">消息</van-tabbar-item>
      <van-tabbar-item icon="setting-o" to="/mygame">我的游戏</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import { Tabbar, TabbarItem } from "vant";
export default {
  name: "AllView",
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
  data: () => {
    return {
      active: 0,
    };
  },
};
</script>

<style lang="scss" scoped>
.van-tabbar-item{
  transition: .3s;
}
.van-tabbar-item--active {
  color: #13BAC9;
  background-color: #fff;
}
</style>